package com.qfedu;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication

public class MPApplication {
	public static void main(String[] args) {
		SpringApplication.run(MPApplication.class,args);
	}

	//mp分页插件
	@Bean
	public MybatisPlusInterceptor mybatisPlusInterceptor(){

		MybatisPlusInterceptor mybatisPlusInterceptor = new MybatisPlusInterceptor();
		mybatisPlusInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
		return mybatisPlusInterceptor;
	}
 /*  @Bean
    public PaginationInnerInterceptor  paginationInnerInterceptor(){
       return  new PaginationInnerInterceptor(DbType.MYSQL);
   }*/
}